<template>
  <div class="center" v-if="message">
    <div class="bg">
      <img :src="message.profile.backgroundUrl" />
    </div>
    <div class="center-top">
      <router-link tag="div" to="/home" class="left">
        <span class="iconfont icon-arrow-left-bold"></span>
      </router-link>
      <div class="rigth iconfont icon-gengduo"></div>
    </div>
    <!--  -->
    <div class="center-one">
      <div class="img">
        <img :src="message.profile.avatarUrl" />
      </div>
      <div class="center-name">{{ message.profile.nickname }}</div>
      <div class="attention">
        <div class="attention-i">{{ message.bindings[1].type }}关注度</div>
        <div class="attention-i">{{ message.bindings[0].type }}粉丝</div>
        <div class="attention-i">Lv.{{ message.level }}</div>
      </div>
      <div class="regionlits">
        <div class="region">广东 惠州</div>
        <div class="age">村龄6年</div>
      </div>
      <div class="regionlitst">
        <div class="regiont">编辑资料</div>
        <div class="aget">
          <span class="iconfont icon-arrow-down-bold"></span>
        </div>
      </div>
    </div>
    <!-- 分割 -->
    <div class="condition">
      <ul>
        <li class="con">主页</li>
        <li>动态</li>
        <li>播客</li>
      </ul>
    </div>
    <!--  -->
    <div class="information">
      <div class="basic-one">
        <div class="basic-left">基本信息</div>
        <div class="basic-rigth">{{ message.profileVillageInfo.title }}</div>
      </div>
      <div class="basic-two">村龄: 6年 (2016年04月注册)</div>
      <div class="basic-three">性别: 男</div>
      <div class="basic-four">地区: 广东 惠州</div>
      <div class="all">查看全部></div>
    </div>
    <!-- 音乐品味 -->
    <div class="taste">
      <div class="taste-one">音乐品味</div>
      <div class="taste-two">
        <div class="img">
          <img
            src="http://p1.music.126.net/CDhYcShQKH2VAMENuCxWWQ==/109951164166513349.jpg?param=140y140"
            alt=""
          />
        </div>
        <div class="taste-list">
          <div class="taste-a">听歌排行</div>
          <div class="taste-b">累计听歌401首</div>
        </div>
      </div>
      <div class="taste-two">
        <div class="img">
          <img
            src="	http://p1.music.126.net/MtYdsD0D5Z7hp6Ga2AHu3w==/109951165875600216.jpg?param=140y140"
            alt=""
          />
        </div>
        <div class="taste-list">
          <div class="taste-a">我喜欢的歌曲</div>
          <div class="taste-b">52首, 播放157次</div>
        </div>
      </div>
    </div>
    <!-- 自创歌单 -->
    <div class="create">
      <div class="create-one">自创的歌单 <span>(1个)</span></div>
      <ul>
        <li>
          <div class="img">
            <img
              src="	http://p1.music.126.net/2vFBKWUmF_jiWGaBgO6RaA==/17648261137761966.jpg?param=140y140"
              alt=""
            />
          </div>
          <div class="create-list">
            <div class="create-a">我的2019年度歌单</div>
            <div class="create-b">9首</div>
          </div>
        </li>
      </ul>
    </div>
    <!-- 收藏 -->
    <div class="collect">
      <div class="create-one">收藏的歌单 <span>(3个)</span></div>
      <ul>
        <li>
          <div class="img">
            <img
              src="https://p1.music.126.net/RzS3vsptmZTnolOO5EKFlA==/109951166169354821.jpg?param=140y140"
              alt=""
            />
          </div>
          <div class="create-list">
            <div class="create-a">[超然电音]听完你就五杀了</div>
            <div class="create-b">9首</div>
          </div>
        </li>
        <li>
          <div class="img">
            <img
              src="	http://p1.music.126.net/0uZ_bKtm4E188Uk9LFN1qg==/109951163187393370.jpg?param=140y140"
              alt=""
            />
          </div>
          <div class="create-list">
            <div class="create-a">适合努力学习英语时听的歌</div>
            <div class="create-b">90首, 播放2566.23次</div>
          </div>
        </li>
        <li>
          <div class="img">
            <img
              src="http://p1.music.126.net/8DkTnzi7jdjWGYl4qbwLCg==/109951164517295956.jpg?param=140y140"
              alt=""
            />
          </div>
          <div class="create-list">
            <div class="create-a">J.Fla is here ! -1 Million !!!</div>
            <div class="create-b">56首, By JFlaOfficial, 播放965.36次</div>
          </div>
        </li>
      </ul>
    </div>
    <!-- 愿望清单 -->
    <div class="wish">
      <div class="wish-left">愿望清单</div>
      <div class="wish-rigth">发布愿望></div>
    </div>
    <!-- 顶格 -->
    <div class="thus"></div>
  </div>
</template>

<script>
import { getUser } from "../api/home";
export default {
  data() {
    return {
      message: "",
    };
  },
  methods: {
    getUserFun() {
      let uid = this.$route.query.id;
      if (!uid) {
        return;
      }
      getUser({ uid }).then((data) => {
        console.log(data, "个人中心");
        this.message = data;
      });
    },
  },
  created() {
    this.getUserFun();
  },
};
</script>

<style lang="less">
.center {
  width: 100%;
  // height: 200%;
  background-color: #f5f5f5;
  overflow-y: scroll;
  .bg {
    width: 100%;
    height: 255px;
    // background-color: #2a140d;
    overflow: hidden;
    position: relative;
    border-bottom-right-radius: 50% 5px;
    border-bottom-left-radius: 50% 5px;
    filter: blur(1px);
    img {
      width: 100%;
    }
  }
  .center-top {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 40px;
    line-height: 40px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    z-index: 100;
    .left {
      height: 40px;
      line-height: 40px;
      margin-left: 12px;
      font-size: 14px;
      color: #fff;
    }
    .rigth {
      margin-right: 12px;
      display: inline-block;
      transform: rotate(90deg);
      color: #fff;
    }
  }
  .center-one {
    width: 92%;
    // height: 143px;
    background-color: #fff;
    // margin: 0 auto;
    border-radius: 10px;
    position: relative;
    // bottom: 0px;
    top: -20px;
    left: 0px;
    right: 0px;
    margin: auto;
    // display: flex;
    text-align: center;
    .img {
      width: 55px;
      height: 55px;
      position: absolute;
      top: -24px;
      left: 0px;
      right: 0px;
      // bottom: 0px;
      margin: auto;
      img {
        width: 55px;
        height: 55px;
        border-radius: 50%;
      }
    }
    .center-name {
      font-size: 20px;
      padding-top: 30px;
      height: 20px;
    }
    .attention {
      display: flex;
      justify-content: center;
      font-size: 12px;
      color: #838383;
      margin-top: 10px;
      position: relative;
      .attention-i {
        margin-left: 8px;
        margin-right: 8px;
      }
    }
    .regionlits {
      display: flex;
      justify-content: center;
      margin-top: 10px;
      .region,
      .age {
        height: 20px;
        line-height: 20px;
        color: #4f4f4f;
        font-size: 12px;
        border: 2px solid #f7f7f7;
        // margin: 0px 5px;
        padding: 0px 5px;
        border-radius: 3px;
      }
    }
    .regionlitst {
      display: flex;
      justify-content: center;
      text-align: center;
      height: 22px;
      padding: 8px 0px;
      .regiont {
        height: 22px;
        line-height: 22px;
        text-align: center;
        font-size: 14px;
        padding: 0px 8px;
        border: 2px solid #f7f7f7;
        border-radius: 30px;
        margin-right: 5px;
      }
      .aget {
        height: 22px;
        width: 22px;
        border: 2px solid #f7f7f7;
        border-radius: 50%;
        display: inline-block;
        .iconfont {
          height: 22px;
          line-height: 22px;
          text-align: center;
          font-size: 12px;
        }
      }
    }
  }
  .condition {
    height: 45px;
    margin-top: -20px;
    ul {
      height: 45px;
      display: flex;
      justify-content: space-around;
      li {
        height: 45px;
        line-height: 45px;
        font-size: 14px;
        color: #666666;
        font-weight: 400;
        &.con {
          font-weight: 800;
          color: #2a140d;
        }
      }
    }
  }
  .information {
    width: 92%;
    background-color: #fff;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    left: 0px;
    right: 0px;
    margin: auto;
    .basic-one {
      display: flex;
      justify-content: space-between;
      margin: 15px 12px 15px 12px;
      height: 18px;
      font-size: 18px;
      font-weight: 600;
      line-height: 18px;
      .basic-left {
        font-size: 18px;
      }
      .basic-rigth {
        height: 12px;
        line-height: 12px;
        border-radius: 10px;
        font-size: 12px;
        color: #585858;
        border: 1px solid #f6f6f6;
        padding: 3px 8px;
        font-weight: 200;
      }
    }
    .basic-two,
    .basic-three {
      margin-left: 12px;
      font-size: 14px;
      color: #7f7f7f;
      margin-bottom: 15px;
    }
    .basic-four {
      font-size: 14px;
      color: #7f7f7f;
      padding: 0px 0px 15px 12px;
      border-bottom: 1px solid #f6f6f6;
    }
    .all {
      height: 30px;
      line-height: 30px;
      text-align: center;
      font-size: 12px;
      color: #7f7f7f;
    }
  }
  .taste {
    width: 92%;
    background-color: #fff;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    left: 0px;
    right: 0px;
    margin: auto;
    margin-top: 12px;
    .taste-one {
      margin: 15px 0px 15px 12px;
      font-size: 18px;
      font-weight: 600;
    }
    .taste-two {
      margin-left: 12px;
      display: flex;
      margin-bottom: 12px;
      .img {
        width: 40px;
        height: 40px;
        img {
          width: 40px;
          height: 40px;
          border-radius: 5px;
        }
      }
      .taste-list {
        display: flex;
        margin-left: 8px;
        flex-direction: column;
        .taste-a {
          height: 15px;
          line-height: 15px;
          font-size: 15px;
          margin-top: 4px;
        }
        .taste-b {
          font-size: 12px;
          color: #a8a8a8;
          margin-top: 4px;
        }
      }
    }
  }
  .create,
  .collect {
    width: 92%;
    background-color: #fff;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    left: 0px;
    right: 0px;
    margin: auto;
    margin-top: 12px;
    .create-one {
      margin: 15px 0px 15px 12px;
      font-size: 18px;
      font-weight: 600;
      span {
        font-size: 12px;
        color: #b0b0b0;
      }
    }
    ul {
      li {
        margin-left: 12px;
        display: flex;
        margin-bottom: 12px;
        .img {
          width: 40px;
          height: 40px;
          img {
            width: 40px;
            height: 40px;
            border-radius: 5px;
          }
        }
        .create-list {
          display: flex;
          margin-left: 8px;
          flex-direction: column;
          .create-a {
            height: 15px;
            line-height: 15px;
            font-size: 15px;
            margin-top: 4px;
          }
          .create-b {
            font-size: 12px;
            color: #a8a8a8;
            margin-top: 4px;
          }
        }
      }
    }
  }
  .wish {
    width: 92%;
    background-color: #fff;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    left: 0px;
    right: 0px;
    margin: auto;
    margin-top: 12px;
    .wish-left {
      margin: 15px 0px 15px 12px;
      font-size: 18px;
      font-weight: 600;
    }
    .wish-rigth {
      margin: 15px 12px 15px 12px;
      font-size: 14px;
      color: #b0b0b0;
    }
  }
  .thus {
    height: 24px;
  }
}
</style>